﻿using RXY_Mall.Core;
using RXY_Mall.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace RXY_Mall.AdminApi.Models
{
    /// <summary>
    /// 广告输出信息
    /// </summary>
    public class GetBannersOutput
    {
        //private string _picture_url;
        ///// <summary>
        ///// 图片
        ///// </summary>
        //public string picture_url
        //{
        //    get
        //    {
        //        return AppConfig.HostUrl + _picture_url;
        //    }
        //    set
        //    {
        //        _picture_url = value;
        //    }
        //}
        /// <summary>
        /// 图片
        /// </summary>
        public string picture_url { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        public string title { get; internal set; }
        /// <summary>
        /// 内容
        /// </summary>
        public string content { get; set; }
        /// <summary>
        /// 广告类型
        /// </summary>
        public AdvertType advert_type { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int sort { get; set; }

    }

    /// <summary>
    /// 优惠券输出信息
    /// </summary>
    public class GetCouponOutput
    {
        internal DateTime _end_date;
        internal DateTime _start_date;
        internal int type;
        internal int sort;

        /// <summary>
        /// 优惠券ID
        /// </summary>
        public int coupon_id { get; set; }
        /// <summary>
        /// 优惠券类型
        /// </summary>
        public CouponType coupon_type { get; set; }
        /// <summary>
        /// 优惠券名称
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 满多少钱可用
        /// </summary>
        public decimal amount { get; set; }
        /// <summary>
        /// 优惠券价值
        /// </summary>
        public decimal value { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>
        public long start_date { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        public long end_date { get; set; }
        /// <summary>
        /// 总数量
        /// </summary>
        public int total_quantity { get; set; }
        /// <summary>
        /// 剩余数量
        /// </summary>
        public int remain_quantity { get; set; }
        /// <summary>
        /// 是否适用于全部商品
        /// </summary>
        public bool is_all { get; set; }
    }

    /// <summary>
    /// 商品广告输出信息
    /// </summary>
    public class GetMarketingGoodsOutput: GetGoodsListOutput
    {
        /// <summary>
        /// 原商品图片
        /// </summary>
        public string original_picture_url { get; set; }        
        /// <summary>
        /// 销售数量
        /// </summary>
        public int sales_count { get; set; }
        
    }

    /// <summary>
    /// 中秋活动
    /// </summary>
    public class GetZhongQiuActivityOutput
    {
        /// <summary>
        /// 拼手气商品
        /// </summary>
        public List<GetMarketingGoodsOutput> luck_goods { get; set; }
        /// <summary>
        /// 合体免单
        /// </summary>
        public List<GetMarketingGoodsOutput> free_goods { get; set; }
        /// <summary>
        /// 会员商品
        /// </summary>
        public List<GetMarketingGoodsOutput> member_goods { get; set; }
        /// <summary>
        /// 会员免费商品
        /// </summary>
        public List<GetMarketingGoodsOutput> member_free_goods { get; set; }
        /// <summary>
        /// 优惠券
        /// </summary>
        public List<GetCouponOutput> coupons { get; set; }
    }

    public class GetHomeGoodsOutput
    {
        /// <summary>
        /// Banner
        /// </summary>
        public List<GetBannersOutput> banners { get; set; }
        /// <summary>
        /// 推荐品牌
        /// </summary>
        public List<GetBrandsOutput> top_brands { get; set; }
        /// <summary>
        /// 推荐分类
        /// </summary>
        public List<GoodsCategoryOutput> top_categories { get; set; }
    }

}